using System;
using System.Data;
using System.Web.UI;
using SouthernLand.Common.DAL;
using SouthernLand.Common.Untilities;

namespace SouthernLand.Controls
{
    public partial class BangGiaVang : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Load_BangGiaVang();
        }

        protected string GetDateUpdate()
        {
            try
            {
                DateTime obj = ClassData.ReturnDateTime("select top 1 Ngay from w4u_BangGiaVang");

                return Formatter.FormatDate(obj) + ", " + obj.ToShortTimeString();
            }
            catch
            {
                return "";
            }
        }

        private void Load_BangGiaVang()
        {
            DataSet ds = ClassData.ReturnDataSet("select * from w4u_BangGiaVang Where Muavao<>''", "table");
            rptBangGiaVang.DataSource = ds;
            rptBangGiaVang.DataBind();
        }
    }
}